package com.xialing.xiaohashu.oss.biz.services.impl;

import com.xialing.framework.common.response.Response;
import com.xialing.xiaohashu.oss.biz.services.FileService;
import com.xialing.xiaohashu.oss.biz.strategy.FileStrategy;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: xialing
 * @Date: 2025/9/5 16:59
 */
@Service
@Slf4j
public class FileServicesImpl implements FileService {

    @Resource
    private FileStrategy fileStrategy;

    @Override
    public Response<?> uploadFile(MultipartFile file) {
        // 上传文件
        fileStrategy.uploadFile(file, "xiaohashu");

        return Response.success();

    }


}
